#include<stdio.h>
#include<stdlib.h>
struct node
{
	int value;
	struct node*next;
};
int main()
{
	int i = 0;
	struct node head;
	head.next = NULL;
	struct node *end = &head;
	struct node *p;
	while (i < 10)
	{
		p = (struct node *)malloc(sizeof(struct node));
		scanf("%d", &p->value);
		p->next = NULL;
		end->next = p;
		end = end->next;
		i++;
	}
	p = &head;
	do
	{
		p = p->next;
		printf("%8d", p->value);
	} while (NULL != p->next);
}
